package main

import "fmt"

type User struct {
	Info *Info
}

type Info struct{}

func (this *Info) Nil() bool {
	if this == nil {
		return true
	}
	return false
}

func main() {
	u := &User{}
	fmt.Println(u.Info.Nil())
	u = (*User)(nil)
	// fmt.Println(u.Info.Nil()) // panic u is nil
}
